#zero_q_freq represents the frequency of days when flow equals 0 mm/day. It is used to determine the number of days when there is no measurable flow in a river/stream of interest.
scale_color_manual(values =c("dodgerblue", "yellow", "pink")) #lets you pick your own colors.
<ggproto object: Class ScaleDiscrete, Scale, gg>
aesthetics: colour
axis_order: function
break_info: function
break_positions: function
breaks: waiver
call: call
clone: function
dimension: function
drop: TRUE
expand: waiver
get_breaks: function
get_breaks_minor: function
get_labels: function
get_limits: function
get_transformation: function
guide: legend
is_discrete: function
is_empty: function
labels: waiver
limits: NULL
make_sec_title: function
make_title: function
map: function
map_df: function
n.breaks.cache: NULL
na.translate: TRUE
na.value: grey50
name: waiver
palette: function
palette.cache: NULL
position: left
range: environment
rescale: function
reset: function
train: function
train_df: function
transform: function
transform_df: function
super: <ggproto object: Class ScaleDiscrete, Scale, gg>
##Question 2
library(ggplot2)library(ggthemes)library(ggpubr)map_aridity <-ggplot(data = camels, aes(x = gauge_lon, y = gauge_lat)) +borders("state", colour ="gray50") +geom_point(aes(color = aridity)) +scale_color_gradient(low ="orange", high ="darkblue") + ggthemes::theme_map() +labs(title ="Map of Aridity", color ="Aridity") +theme(legend.position ="right")map_p_mean <-ggplot(data = camels, aes(x = gauge_lon, y = gauge_lat)) +borders("state", colour ="gray50") +geom_point(aes(color = p_mean)) +scale_color_gradient(low ="yellow", high ="darkblue") + ggthemes::theme_map() +labs(title ="Map of Precipitation (p_mean)", color ="Precipitation") +theme(legend.position ="right")combined_map <-ggarrange(map_aridity, map_p_mean, ncol =1, nrow =2)print(map_aridity)
#I would move forward with the Bagged MLP model because it is the best model according to both RMSE and R-squared values. It provides the most accurate predictions out of the four models but Linear Regression or Random Forest could be used as well due to falling just short of Bagged MLP.
##Build Your Own
install.packages("rsample")
The downloaded binary packages are in
/var/folders/9z/jhvcp6pd2jdgn7z7pd30zw1w0000gn/T//RtmpNxn0WR/downloaded_packages
library(rsample)set.seed(123)camels_split <-initial_split(camels, prop =0.75)camels_train <-training(camels_split)camels_test <-testing(camels_split)camels_cv <-vfold_cv(camels_train, v =10)